#include "OnlyImageInfo.hpp"

void OnlyImageInfoFormat::Start(const std::filesystem::path& savepath,const BaseFormatAdditionalInf& info)
{
  file.open(savepath,std::ios::trunc);
  if(!file.is_open())
    throw std::runtime_error("OnlyImageInfoFormat can't create file");
}

void OnlyImageInfoFormat::FileSaveFuncCall(const ImageType& inf)
{
  file<<inf.frameID<<'\t'<<inf.size<<'\t'<<inf.additional<<std::endl;
}

void OnlyImageInfoFormat::Stop()
{
  file.close();
}
